<template>
  <div class="warrow">
    <div class="box">
      <div class="back"></div>
    </div>
  </div>
</template>

<script>
export default {
  data: function () {
    return {};
  },
  computed: {},
};
</script>

<style scoped>
.box {
  width: 900px;
  height: 900px;
}
.back {
  width: 300px;
  height: 300px;
  animation: maAnt 3s infinite;
}
@keyframes maAnt {
  0% {
    margin-left: 0;
    margin-top: 0;
    background-color: red;
  }
  25% {
    margin-left: 600px;
    margin-top: 0;
    background-color: green;
  }
  50% {
    margin-left: 600px;
    margin-top: 600px;
    background-color: blue;
  }
  75% {
    margin-left: 0;
    margin-top: 600px;
    background-color: pink;
  }
  100% {
    margin-left: 0;
    margin-top: 0;
    background-color: yellow;
  }
}
</style>